﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cricket.LinqModel
{
    public partial class Client
    {
        private IDataRepository _dataObject;
        public Client(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void Create()
        {
            _dataObject.CreateClient(this);
        }
        public void DeleteClient()
        {
            _dataObject.DeleteClient(this);
        }
        public List<GetAllClientsResult> GetAllClient()
        {
            return _dataObject.GetAllClient();
        }
        public void GetClientById()
        {
            _dataObject.GetClientById(this);
        }
        public void Update()
        {
            _dataObject.UpdateClient(this);
        }
        public List<GetClientsByAdminIdResult> GetClientsByAdminId(int AdminId)
        {
            return _dataObject.GetClientsByAdminId(AdminId);
        }
        public List<Client> CheckUserNameExist(int ClientId, string username)
        {
            return _dataObject.CheckUserNameExist(ClientId, username);
        }
        public List<ClientLoginResult> ClientLogin(string username, string password)
        {
            return _dataObject.ClientLogin(username, password);
        }
        public List<GetTopClientForSuperAdminResult> GetTopClientForSuperAdmin()
        {
            return _dataObject.GetTopClientForSuperAdmin();
        }
        public List<GetTopClientForAdminResult> GetTopClientForAdmin(int AdminId)
        {
            return _dataObject.GetTopClientForAdmin(AdminId);
        }
        public decimal? GetClientBettingLimit(int clientId)
        {
            return _dataObject.GetClientBettingLimit(clientId);
        }
        public decimal? GetMatchClientBettingLimit(int clientId)
        {
            return _dataObject.GetMatchClientBettingLimit(clientId);
        }
        public void UpdateClientLimit(int clientId, string limit)
        {
            _dataObject.UpdateClientLimit(clientId, limit);
        }
        public void UpdateClientMatchLimit(int matchScheduleId, int clientId)
        {
            _dataObject.UpdateClientMatchLimit(matchScheduleId, clientId);
        }
        public List<GetMinAmountResult> GetMinAmount(int clientId, int matchScheduleId)
        {
            return _dataObject.GetMinAmount(clientId, matchScheduleId);
        }
        public List<GetTotalOfSessionResult> GetTotalOfSession(int clientId, int matchScheduleId)
        {
            return _dataObject.GetTotalOfSession(clientId, matchScheduleId);
        }
        public void UpdateClientLimitFromMatch(int ClientId)
        {
            _dataObject.UpdateClientLimitFromMatch(ClientId);
        }
        public void UpdateClientLimitForSession(int ClientId)
        {
            _dataObject.UpdateClientLimitForSession(ClientId);
        }
        public List<GetMinAmountForMatchResult> GetMinAmountForMatch(int MatchId, int ClientId)
        {
            return _dataObject.GetMinAmountForMatch(MatchId, ClientId);
        }
        public List<GetTotalAmountForSessionResult> GetTotalAmountForSession(int MatchId, int ClientId)
        {
            return _dataObject.GetTotalAmountForSession(MatchId, ClientId);
        }

        public List<GetFancy90110AmountResult> GetFancy90110Amount(int MatchId, int ClientId)
        {
            return _dataObject.GetFancy90110Amount(MatchId, ClientId);
        }
        public void UpdateClientLimitByAdmin()
        {
            _dataObject.UpdateClientLimitByAdmin(this);
        }
        public List<GetAllInActiveClientsResult> GetAllInActiveClient()
        {
            return _dataObject.GetAllInActiveClient();
        }
        public List<GetInActiveClientsByAdminIdResult> GetInActiveClientsByAdminId(int AdminId)
        {
            return _dataObject.GetInActiveClientsByAdminId(AdminId);
        }
        public void UpdateClientLimitFromNineEleven(int ClientId)
        {
            _dataObject.UpdateClientLimitFromNineEleven(ClientId);
        }
        public void UpdateIsLoginForClient()
        {
            _dataObject.UpdateIsLoginForClient(this);
        }
        public void UpdateIsReloadForClient() 
        {
            _dataObject.UpdateIsReloadForClient(this);
        }
        public List<GetAllLoginClientsResult> GetAllLoginClient()
        {
            return _dataObject.GetAllLoginClient();
        }
        public List<GetAllReloadClientsResult> GetAllReloadClients()
        {
            return _dataObject.GetAllReloadClients();
        }
        public List<GetAllLoginByAdminResult> GetAllLoginByAdmin(int AdminId)
        {
            return _dataObject.GetAllLoginByAdmin(AdminId);
        }
        public void LogoutAllClient()
        {
            _dataObject.LogoutAllClient();
        }
        public void ReloadAllClient()
        {
            _dataObject.ReloadAllClient();
        }
        public void UpdateClientLimitByClient(int clientId, decimal? limit)
        {
            _dataObject.UpdateClientLimitByClient(clientId, limit);
        }

        
    }
}
